package org.example.demo_test;

import org.apache.thrift.TException;
import org.example.demo.model.addStoreReq;
import org.example.demo.model.deleteStoreReq;
import org.example.demo.model.getStoreReq;
import org.example.demo.model.updateStoreReq;
import org.example.demo.storeInterface;

import java.util.ArrayList;
import java.util.List;

public class storeInterfaceImpl implements storeInterface.Iface {
    @Override
    public int addStore(addStoreReq req) throws TException {
        System.out.println("you add a store data");
        return 1;
    }

    @Override
    public int deleteStore(deleteStoreReq req) throws TException {
        System.out.println("you delete a store data");
        return 2;
    }

    @Override
    public int updateStore(updateStoreReq req) throws TException {
        System.out.println("you update a store data");
        return 3;
    }

    @Override
    public List<getStoreReq> getStore(int id, String uuid) throws TException {
        System.out.println("show store lists");
        getStoreReq req = new getStoreReq(1,"xiaoxu",1,"22-44","2023-12-15","2023-12-14",1);
        getStoreReq req1 = new getStoreReq(2,"zhangsan",1,"22-44","2023-12-15","2023-12-14",1);
        List<getStoreReq>  list= new ArrayList<getStoreReq>();
        list.add(req);
        list.add(req1);
        return list;
    }
}
